﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Routing;

namespace VQWEB.administrator.handlers
{
    /// <summary>
    /// Summary description for IndexsHandler
    /// </summary>
    public class IndexsHandler : IHttpHandler,IRouteHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            context.Response.Write("Hello Index");

            string logout = context.Request["logout"];
            if(!string.IsNullOrEmpty(logout))
                System.Web.Security.FormsAuthentication.SignOut();

        }

        public IHttpHandler GetHttpHandler(RequestContext requestContext)
        {
            return this;
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}